# Author    :Dun_Hz
# Time      :2024/3/14 17:05
# 将十进制转换为二进制
i = 1
def decimal_to_binary_recursion(n, result=''):
    global i
    if n == 0:      # 递归终止条件
        return result
    else:
        result = str(n%2)+result
        return decimal_to_binary_recursion(n//2, result)


print(decimal_to_binary_recursion(8))
